package com.yili.oa.dao;

import com.yili.oa.models.FtGameKind;
import com.yili.oa.models.FtGameKindExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface FtGameKindMapper {
    @SelectProvider(type=FtGameKindSqlProvider.class, method="countByExample")
    long countByExample(FtGameKindExample example);

    @DeleteProvider(type=FtGameKindSqlProvider.class, method="deleteByExample")
    int deleteByExample(FtGameKindExample example);

    @Delete({
        "delete from ft_game_kind",
        "where id = #{id,jdbcType=BIGINT}"
    })
    int deleteByPrimaryKey(Long id);

    @Insert({
        "insert into ft_game_kind (id, game_kind)",
        "values (#{id,jdbcType=BIGINT}, #{gameKind,jdbcType=VARCHAR})"
    })
    int insert(FtGameKind record);

    @InsertProvider(type=FtGameKindSqlProvider.class, method="insertSelective")
    int insertSelective(FtGameKind record);

    @SelectProvider(type=FtGameKindSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="game_kind", property="gameKind", jdbcType=JdbcType.VARCHAR)
    })
    List<FtGameKind> selectByExample(FtGameKindExample example);

    @Select({
        "select",
        "id, game_kind",
        "from ft_game_kind",
        "where id = #{id,jdbcType=BIGINT}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="game_kind", property="gameKind", jdbcType=JdbcType.VARCHAR)
    })
    FtGameKind selectByPrimaryKey(Long id);

    @UpdateProvider(type=FtGameKindSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") FtGameKind record, @Param("example") FtGameKindExample example);

    @UpdateProvider(type=FtGameKindSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") FtGameKind record, @Param("example") FtGameKindExample example);

    @UpdateProvider(type=FtGameKindSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(FtGameKind record);

    @Update({
        "update ft_game_kind",
        "set game_kind = #{gameKind,jdbcType=VARCHAR}",
        "where id = #{id,jdbcType=BIGINT}"
    })
    int updateByPrimaryKey(FtGameKind record);
}